import java.util.Scanner;

public class Main1804 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n= sc.nextInt();
        int[] arr=new int[n];
        for (int i=0;i< arr.length;i++){
            arr[i]=sc.nextInt();
        }
        int z=0;
        int r=0;
        int d=0;
        for (int i=0;i< arr.length;i++){
            if (arr[i]==90){
                z++;
            }if (arr[i]<90){
                r++;
            }if (arr[i]>90){
                d++;
            }
        }
        System.out.println(z+" "+r+" "+d);
    }
}
